From 2052e9b7d672357c254ce0088110e2ec67d2f0ed Mon Sep 17 00:00:00 2001 From: WhiredPlanck Date: Sat, 5 Jul 2025 03:57:30 +0800 Subject: [PATCH] Fix deprecated declarations in C++17 Gbp-Pq: Topic backport Gbp-Pq: Name 0007-Fix-deprecated-declarations-in-C-17.patch --- src/Segments.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Segments.hpp b/src/Segments.hpp index 2186dfd..57320fe 100644 --- a/src/Segments.hpp +++ b/src/Segments.hpp @@ -18,6 +18,7 @@ #pragma once +#include #include #include "Common.hpp" @@ -53,8 +54,11 @@ public: managed.push_back(str); } - class iterator : public std::iterator { + class iterator { public: + using iterator_category = std::input_iterator_tag; + using value_type = const char*; + iterator(const Segments* const _segments, size_t _cursor) : segments(_segments), cursor(_cursor) {} -- 2.30.2